home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1994 April / 64er_Magazin_94-04_1994_Markt__Technik_de_Side_A.d64 / imp.source v2 < prev    next >
Text File  |  2022-10-26  |  12KB  |  757 lines

  1.  
  2.  
  3.  
  4. ;---------------------------------------
  5. ;
  6. ;       - I M P E R O I D   V 2 -
  7. ;
  8. ;         - by Hannes Sommer -
  9. ;
  10. ;      - (c) Markt & Technik '94 -
  11. ;
  12. ;---------------------------------------
  13.  
  14.  
  15.  
  16. v        = 53248
  17. bord     = 703
  18.  
  19.          *= $8000
  20.  
  21.  
  22.          jmp title
  23.  
  24.  
  25. cols     .byte 0,0,0,0,0,0,0,0
  26.          .byte 0,0,0,0,0,0,0,0
  27.          .byte 0,9,8,10,15,7,1,1
  28.          .byte 1,1,13,3,14,4,6,0
  29.  
  30.          .byte 0,0,0,0,0,0,0,0
  31.          .byte 0,0,0,0,0,0,0,0
  32.  
  33.  
  34.  
  35. ;------------ F L I - Logo -------------
  36.  
  37.  
  38. fli
  39.  
  40.          lda #56
  41.          sta $d011
  42.  
  43.          inc fly1+1
  44. fly1     lda #0
  45.          lsr a
  46.          and #31
  47.          tay
  48.  
  49.          ldx #0
  50. fli0     lda cols,y
  51.          sta $50,x
  52.          iny
  53.          inx
  54.          cpx #15
  55.          bne fli0
  56.          lda #0
  57.          sta $5f
  58.  
  59.  
  60.          lda #49
  61. fli1     cmp $d012
  62.          bcs fli1
  63.  
  64.          ldx #3
  65. fli2     dex
  66.          bne fli2
  67.  
  68.          lda #63
  69.          ldx #8
  70.          sta $d011
  71.          stx $d018
  72.          lda $5f
  73.          sta $d020
  74.          sta $d021
  75.          lda #56
  76.          ldx #24
  77.          sta $d011
  78.          stx $d018
  79.          lda $5f
  80.          sta $d020
  81.          sta $d021
  82.          lda #57
  83.          ldx #40
  84.          sta $d011
  85.          stx $d018
  86.          lda $5f
  87.          sta $d020
  88.          sta $d021
  89.          lda #58
  90.          ldx #56
  91.          sta $d011
  92.          stx $d018
  93.          lda $5f
  94.          sta $d020
  95.          sta $d021
  96.          lda #59
  97.          ldx #72
  98.          sta $d011
  99.          stx $d018
  100.          lda $50
  101.          sta $d020
  102.          sta $d021
  103.          lda #60
  104.          ldx #88
  105.          sta $d011
  106.          stx $d018
  107.          lda $51
  108.          sta $d020
  109.          sta $d021
  110.          lda #61
  111.          ldx #104
  112.          sta $d011
  113.          stx $d018
  114.          lda $52
  115.          sta $d020
  116.          sta $d021
  117.          lda #62
  118.          ldx #120
  119.          sta $d011
  120.          stx $d018
  121.          lda $50
  122.          sta $d020
  123.          sta $d021
  124.  
  125.          lda #63    ;Line #2
  126.          ldx #8
  127.          sta $d011
  128.          stx $d018
  129.          lda $51
  130.          sta $d020
  131.          sta $d021
  132.          lda #56
  133.          ldx #24
  134.          sta $d011
  135.          stx $d018
  136.          lda $52
  137.          sta $d020
  138.          sta $d021
  139.          lda #57
  140.          ldx #40
  141.          sta $d011
  142.          stx $d018
  143.          lda $53
  144.          sta $d020
  145.          sta $d021
  146.          lda #58
  147.          ldx #56
  148.          sta $d011
  149.          stx $d018
  150.          lda $50
  151.          sta $d020
  152.          sta $d021
  153.          lda #59
  154.          ldx #72
  155.          sta $d011
  156.          stx $d018
  157.          lda $51
  158.          sta $d020
  159.          sta $d021
  160.          lda #60
  161.          ldx #88
  162.          sta $d011
  163.          stx $d018
  164.          lda $52
  165.          sta $d020
  166.          sta $d021
  167.          lda #61
  168.          ldx #104
  169.          sta $d011
  170.          stx $d018
  171.          lda $53
  172.          sta $d020
  173.          sta $d021
  174.          lda #62
  175.          ldx #120
  176.          sta $d011
  177.          stx $d018
  178.          lda $54
  179.          sta $d020
  180.          sta $d021
  181.  
  182.          lda #63   ;Line #3
  183.          ldx #8
  184.          sta $d011
  185.          stx $d018
  186.          lda $55
  187.          sta $d020
  188.          sta $d021
  189.          lda #56
  190.          ldx #24
  191.          sta $d011
  192.          stx $d018
  193.          lda $50
  194.          sta $d020
  195.          sta $d021
  196.          lda #57
  197.          ldx #40
  198.          sta $d011
  199.          stx $d018
  200.          lda $51
  201.          sta $d020
  202.          sta $d021
  203.          lda #58
  204.          ldx #56
  205.          sta $d011
  206.          stx $d018
  207.          lda $52
  208.          sta $d020
  209.          sta $d021
  210.          lda #59
  211.          ldx #72
  212.          sta $d011
  213.          stx $d018
  214.          lda $53
  215.          sta $d020
  216.          sta $d021
  217.          lda #60
  218.          ldx #88
  219.          sta $d011
  220.          stx $d018
  221.          lda $54
  222.          sta $d020
  223.          sta $d021
  224.          lda #61
  225.          ldx #104
  226.          sta $d011
  227.          stx $d018
  228.          lda $55
  229.          sta $d020
  230.          sta $d021
  231.          lda #62
  232.          ldx #120
  233.          sta $d011
  234.          stx $d018
  235.          lda $56
  236.          sta $d020
  237.          sta $d021
  238.  
  239.          lda #63   ;Line #4
  240.          ldx #8
  241.          sta $d011
  242.          stx $d018
  243.          lda $57
  244.          sta $d020
  245.          sta $d021
  246.          lda #56
  247.          ldx #24
  248.          sta $d011
  249.          stx $d018
  250.          lda $50
  251.          sta $d020
  252.          sta $d021
  253.          lda #57
  254.          ldx #40
  255.          sta $d011
  256.          stx $d018
  257.          lda $51
  258.          sta $d020
  259.          sta $d021
  260.          lda #58
  261.          ldx #56
  262.          sta $d011
  263.          stx $d018
  264.          lda $52
  265.          sta $d020
  266.          sta $d021
  267.          lda #59
  268.          ldx #72
  269.          sta $d011
  270.          stx $d018
  271.          lda $53
  272.          sta $d020
  273.          sta $d021
  274.          lda #60
  275.          ldx #88
  276.          sta $d011
  277.          stx $d018
  278.          lda $54
  279.          sta $d020
  280.          sta $d021
  281.          lda #61
  282.          ldx #104
  283.          sta $d011
  284.          stx $d018
  285.          lda $55
  286.          sta $d020
  287.          sta $d021
  288.          lda #62
  289.          ldx #120
  290.          sta $d011
  291.          stx $d018
  292.          lda $56
  293.          sta $d020
  294.          sta $d021
  295.  
  296.          lda #63   ;Line #5
  297.          ldx #8
  298.          sta $d011
  299.          stx $d018
  300.          lda $57
  301.          sta $d020
  302.          sta $d021
  303.          lda #56
  304.          ldx #24
  305.          sta $d011
  306.          stx $d018
  307.          lda $58
  308.          sta $d020
  309.          sta $d021
  310.          lda #57
  311.          ldx #40
  312.          sta $d011
  313.          stx $d018
  314.          lda $59
  315.          sta $d020
  316.          sta $d021
  317.          lda #58
  318.          ldx #56
  319.          sta $d011
  320.          stx $d018
  321.          lda $52
  322.          sta $d020
  323.          sta $d021
  324.          lda #59
  325.          ldx #72
  326.          sta $d011
  327.          stx $d018
  328.          lda $53
  329.          sta $d020
  330.          sta $d021
  331.          lda #60
  332.          ldx #88
  333.          sta $d011
  334.          stx $d018
  335.          lda $54
  336.          sta $d020
  337.          sta $d021
  338.          lda #61
  339.          ldx #104
  340.          sta $d011
  341.          stx $d018
  342.          lda $55
  343.          sta $d020
  344.          sta $d021
  345.          lda #62
  346.          ldx #120
  347.          sta $d011
  348.          stx $d018
  349.          lda $56
  350.          sta $d020
  351.          sta $d021
  352.  
  353.          lda #63   ;Line #6
  354.          ldx #8
  355.          sta $d011
  356.          stx $d018
  357.          lda $57
  358.          sta $d020
  359.          sta $d021
  360.          lda #56
  361.          ldx #24
  362.          sta $d011
  363.          stx $d018
  364.          lda $58
  365.          sta $d020
  366.          sta $d021
  367.          lda #57
  368.          ldx #40
  369.          sta $d011
  370.          stx $d018
  371.          lda $59
  372.          sta $d020
  373.          sta $d021
  374.          lda #58
  375.          ldx #56
  376.          sta $d011
  377.          stx $d018
  378.          lda $54
  379.          sta $d020
  380.          sta $d021
  381.          lda #59
  382.          ldx #72
  383.          sta $d011
  384.          stx $d018
  385.          lda $55
  386.          sta $d020
  387.          sta $d021
  388.          lda #60
  389.          ldx #88
  390.          sta $d011
  391.          stx $d018
  392.          lda $56
  393.          sta $d020
  394.          sta $d021
  395.          lda #61
  396.          ldx #104
  397.          sta $d011
  398.          stx $d018
  399.          lda $57
  400.          sta $d020
  401.          sta $d021
  402.          lda #62
  403.          ldx #120
  404.          sta $d011
  405.          stx $d018
  406.          lda $58
  407.          sta $d020
  408.          sta $d021
  409.  
  410.          lda #63   ;Line #7
  411.          ldx #8
  412.          sta $d011
  413.          stx $d018
  414.          lda $59
  415.          sta $d020
  416.          sta $d021
  417.          lda #56
  418.          ldx #24
  419.          sta $d011
  420.          stx $d018
  421.          lda $56
  422.          sta $d020
  423.          sta $d021
  424.          lda #57
  425.          ldx #40
  426.          sta $d011
  427.          stx $d018
  428.          lda $57
  429.          sta $d020
  430.          sta $d021
  431.          lda #58
  432.          ldx #56
  433.          sta $d011
  434.          stx $d018
  435.          lda $58
  436.          sta $d020
  437.          sta $d021
  438.          lda #59
  439.          ldx #72
  440.          sta $d011
  441.          stx $d018
  442.          lda $59
  443.          sta $d020
  444.          sta $d021
  445.          lda #60
  446.          ldx #88
  447.          sta $d011
  448.          stx $d018
  449.          lda $57
  450.          sta $d020
  451.          sta $d021
  452.          lda #61
  453.          ldx #104
  454.          sta $d011
  455.          stx $d018
  456.          lda $58
  457.          sta $d020
  458.          sta $d021
  459.          lda #62
  460.          ldx #120
  461.          sta $d011
  462.          stx $d018
  463.          lda $59
  464.          sta $d020
  465.          sta $d021
  466.          lda #63
  467.          ldx #12
  468.          sta $d011
  469.          stx $d018
  470.          lda #0
  471.          sta $d020
  472.          sta $d021
  473.          lda #88
  474.          sta $d011
  475.  
  476.          rts
  477.  
  478.  
  479.  
  480.  
  481.  
  482. ;--------------- G A M E ---------------
  483.  
  484.  
  485. game
  486.          lda #64
  487.          sta $d011
  488.          sta $d020
  489.          sta $d021
  490.  
  491.          ldx #0
  492. in1      lda #255
  493.          sta $4000,x
  494.          lda #0
  495.          sta $d800,x
  496.          sta $d900,x
  497.          sta $da00,x
  498.          sta $db00,x
  499.          dex
  500.          bne in1
  501.  
  502.  
  503.          lda #$44    ;Aufbau des
  504.          sta in6+2   ;Sterne-Himmels
  505.          ldx #0
  506.          stx in6+1
  507.          ldy #0
  508. in5      tya
  509.          clc
  510.          adc starl,x
  511.          and #31
  512. in6      sta $4400,y
  513.          iny
  514.          cpy #40
  515.          bne in5
  516.          lda in6+1
  517.          clc
  518.          adc #40
  519.          sta in6+1
  520.          bcc in7
  521.          inc in6+2
  522. in7      inx
  523.          cpx #25
  524.          bne in5-2
  525.  
  526.          lda #0
  527.          sta end+1
  528.  
  529.          sei         ;Irq+Grafik-Modi
  530.          lda #<irq
  531.          sta $fffe
  532.          lda #>irq
  533.          sta $ffff
  534.          lda #129
  535.          sta $d01a
  536.          lda #250
  537.          sta $d012
  538.          lda #27
  539.          sta $d011
  540.          lda #198
  541.          sta $dd00
  542.          lda #16
  543.          sta $d018
  544.          lda #200
  545.          sta $d016
  546.  
  547.          cli
  548.  
  549. s1
  550.  
  551.  
  552. end      lda #0      ;Ende ?
  553.          beq noend
  554.          lda #64
  555.          sta $d011
  556.          sta $d021
  557.          sei
  558.          jmp title
  559.  
  560. noend
  561.          jmp s1
  562.  
  563.  
  564. starl    .byte 0,5,20,13,28
  565.          .byte 14,3,9,23,18
  566.          .byte 4,10,21,8,27
  567.          .byte 11,2,26,15,6
  568.          .byte 24,1,16,29,7
  569.  
  570.  
  571. nmi      inc end+1 ;*** NMI ***
  572.          rti
  573.  
  574.  
  575. irq      pha       ;*** IRQ ***
  576.          txa
  577.          pha
  578.          tya
  579.          pha
  580.          lda $d019
  581.          sta $d019
  582.          bmi t1
  583.          lda $dc0d
  584.          cli
  585. irqend   pla
  586.          tay
  587.          pla
  588.          tax
  589.          pla
  590.          rti
  591.  
  592.  
  593. t1
  594.          inc bord
  595.  
  596.          ldx #15
  597. t5       lda starp,x  ;Star-moving!
  598.          and #248
  599.          sta t6+1
  600.          txa
  601.          and #7
  602.          tay
  603.          lda #255
  604. t6       sta $4000,y
  605.          lda starp,x
  606.          sec
  607.          sbc stars,x
  608.          sta starp,x
  609.          and #248
  610.          sta t7+1
  611.          lda starp,x
  612.          and #7
  613.          sta tt7+1
  614. tt7      lda und
  615. t7       sta $4000,y
  616.          dex
  617.          bpl t5
  618.  
  619.          inc t8+1     ;Star-Flashing!
  620. t8       lda #0
  621.          lsr a
  622.          and #15
  623.          tax
  624.          lda grey,x
  625.          sta $d021
  626.  
  627.          lda #0
  628.          sta bord
  629.  
  630.          jmp irqend
  631.  
  632.  
  633. starp    .byte 220,10,140,200
  634.          .byte 160,180,100,50
  635.          .byte 40,90,80,240
  636.          .byte 150,110,134,215
  637. stars    .byte 1,2,1,3,1,4,1,3
  638.          .byte 2,1,4,1,1,1,3,1
  639.  
  640.  
  641. grey     .byte 9,11,12,12,15,3,7,1
  642.          .byte 1,7,3,15,12,12,11,9
  643.  
  644.  
  645. ;-------------- T I T L E --------------
  646.  
  647.  
  648. title
  649.          sei
  650.          lda #0
  651.          sta $d020
  652.          sta $d021
  653.          sta $d01a
  654.          sta $d011
  655.          sta v+27
  656.          sta v+23
  657.          sta v+29
  658.          sta fly1+1
  659.          ldx #16
  660. ti0      sta $d000,x
  661.          sta $d400,x
  662.          sta $d408,x
  663.          dex
  664.          bpl ti0
  665.  
  666.          ldx #0
  667.          lda #$35
  668.          sta 1
  669. ti1      lda $bc00,x
  670.          sta $d800,x
  671.          lda $bc18,x
  672.          sta $d818,x
  673.          lda #0
  674.          sta $d918,x
  675.          lda #9
  676.          sta $d940,x
  677.          sta $da40,x
  678.          sta $db00,x
  679.          dex
  680.          bne ti1
  681.  
  682.  
  683.  
  684.  
  685.          lda #<nmi
  686.          sta $fffa
  687.          sta $fffe
  688.          lda #>nmi
  689.          sta $fffb
  690.          sta $ffff
  691.  
  692.  
  693.          lda #196
  694.          sta 56576
  695.          lda #27
  696.          sta $d011
  697.          lda #224
  698.          sta 56322
  699.  
  700.  
  701.  
  702. ti20     lda $d011
  703.          bmi ti20
  704.          sei
  705.          lda #120
  706.          sta $d011
  707.          lda #216
  708.          sta 53270
  709.          lda #24
  710.          sta 53272
  711.  
  712.  
  713.          jsr fli   ;** FLI-Logo! **
  714.  
  715.  
  716.          lda #24   ;Text-Mode
  717.          sta $d011
  718.  
  719.          ldx #0    ;Colour-changing...
  720. ti25     lda tiwait,x
  721.          cmp $d012
  722.          bcs ti25
  723.          lda ticol1,x
  724.          sta $d022
  725.          lda ticol2,x
  726.          sta $d023
  727.          inx
  728.          cpx #4
  729.          bne ti25
  730.  
  731. ti26     lda $dc00 ;Joy-Button ?
  732.          and #16
  733.          bne ti28
  734.          jmp game
  735.  
  736. ti28
  737.  
  738.  
  739.  
  740. ti99     lda $d011
  741.          bpl ti99
  742.          jmp ti20
  743.  
  744.  
  745.  
  746.  
  747.  
  748. tiwait   .byte 100,134,158,188
  749. ticol1   .byte 9,6,9,4
  750. ticol2   .byte 5,14,10,12
  751.  
  752.          *= $9f00
  753.  
  754. und      .byte 127,191,223,239
  755.          .byte 247,251,253,254
  756.  
  757.